package JavaSEAdvance.day10_MapAndStream;

import java.util.HashMap;
import java.util.Map;

/**
 * @author Xiao
 * @date 2021/7/28
 */
public class D10_1MapDemo {
    public static void main(String[] args) {
        Map<String, String> map = new HashMap<>(Map.ofEntries(
                Map.entry("age","20"),
                Map.entry("name","zhangsan"),
                Map.entry("score","20")));
//        map.put("score", "20");
        System.out.println(map);
        for (String s : map.keySet()) {
            System.out.println(s + "\t" + map.get(s));
        }
        for (Map.Entry<String, String> entry : map.entrySet()) {
            System.out.println(entry.getKey() + "\t" + entry.getValue());
        }
    }
}
